package com.sunhao.myapplication.entity;
import com.sunhao.myapplication.R;

import java.util.ArrayList;

public class GoodsInfo {

    public int id;

    public String name;

    public String description;

    public float price;

    //图片保存路径
    public String picPath;


    //图片资源编号
    public int pic;

//    商品名称的价格数组
    private static String[] NameArray = {
            "iPhone11", "Mate30", "小米10", "OPPO Reno3", "vivo x30", "荣耀30s"
    };

//    商品描述的数组
    private static String[] DescArray = {
            "iPhone11", "Mate30", "小米10", "OPPO Reno3", "vivo x30", "荣耀30s"
    };

//    商品价格
    private static float[] PriceArray = {
            6299,4999,3999,2999,2998,2399
    };

//    大图数组
    private static  int[]  PicArray={
//            R.drawable.iphone,R.drawable.huawei,R.drawable.xiaomi,
//            R.drawable.oppo,R.drawable.vivo,R.drawable.rongyao
    };

    //获取默认的手机信息列表
   public static   ArrayList<GoodsInfo> getDefaultList(){
        ArrayList<GoodsInfo> goodsList = new ArrayList<>();
        for (int i = 0; i < NameArray.length; i++) {
            GoodsInfo info=new GoodsInfo();
            info .id=i;
            info.name=NameArray[i];
            info.description=DescArray[i];
            info.price=PriceArray[i];
            info.pic=PicArray[i];
            goodsList.add(info);
        }

        return goodsList;
    }

}
